﻿/// Write methods that calculate the surface of a triangle by given:
/// Side and an altitude to it; Three sides; Two sides and an angle between them. Use System.Math.

using System;


namespace c_sh_II_lek_4_classes
{
    class zad4
    {
        static void Main()
        {
            Console.WriteLine(SurfaceSideAndAltitude( 3,  4));
            Console.WriteLine(SurfaceTreeSides(3, 4, 5));
            Console.WriteLine(SurfaceTwoSidesAngle(3, 4, 90));
        }

        public static double SurfaceSideAndAltitude(double side, double altitude)
        {
            return (side * altitude) / 2;
        }

        public static double SurfaceTreeSides(double side1, double side2, double side3)
        {
            return (side1 + side2 + side3) / 2;
        }

        public static double SurfaceTwoSidesAngle(double side1, double side2, double alfa)
        {
            return (side1 * side2 * Math.Sin(Math.PI * alfa / 180)) / 2;
        }
    }
}
